import java.util.Scanner;

/**
 * Created by dllo on 18/4/12.
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入次数:");
        int a = scanner.nextInt();
        int b = 4 * (a - 1) + 1;
        int x; // 长
        int y; // 宽


        for (y = 1; y <= b; y++) {
            for (x = 1; x <= b; x++) {
                if (y == 1 || y == b) {
                    System.out.print("*");
                } else if (x == 1 || x == b) {
                    System.out.print("*");
                } else {
                    System.out.print(" ");
                }
            }
            System.out.println();
        }


    }
}
